package com.kingint.mbg.dto.department;

import com.baomidou.mybatisplus.annotation.TableField;
import com.kingint.mbg.bas.entity.BasRepairGoods;
import com.kingint.mbg.bas.entity.BasWarrantyItems;
import com.kingint.mbg.dto.MemberReturn;
import com.kingint.mbg.group.Insert;
import com.kingint.mbg.group.Update;
import com.kingint.mbg.sys.entity.UmsMember;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 部门维修传递相关参数
 */
@Data
public class DepartmentRepairParam implements Serializable {

    /**
     * 酒店id
     */
    @TableField("hotel_id")
    private Integer hotelId;

    @TableField(exist = false)
    private String hotelName;

    @TableField("work_id")
    private Integer workId;

    /**
     * 对应维修单的id
     */
    @TableField(exist = false)
    private Integer repairId;
    /**
     * 楼层id
     */
    @TableField("floor_id")
    private Integer floorId;

    @TableField("floor_name")
    private String floorName;

    /**
     * 房间id
     */
    @TableField("room_id")
    @NotNull(groups = {Insert.class},message = "房间部门为空")
    private Integer roomId;

    @TableField("room_num")
    private String roomNum;

    @ApiModelProperty("提交人id")
    @TableField("submit_user_id")
    private Long submitUserId;

    @ApiModelProperty("提交人名称")
    @TableField(exist = false)
    private String submitUserName;

    @ApiModelProperty("工单号")
    @TableField("order_sn")
    private String orderSn;

    /**
     * 维修物品集合
     */
    @TableField(exist = false)
    @NotEmpty(groups = {Insert.class},message = "维修物品不能为空")
    private List<BasWarrantyItems> warrantyItemsList;

    @TableField("warranty_content")
    private String warrantyContent;

    /**
     * 保修物品备注
     */
    @TableField("warranty_note")
    private String warrantyNote;

    /**
     * 维修描述
     */
    @TableField("problem_description")
    private String problemDescription;

    /**
     * 上传图片（相关的图片逗号拼接）
     */
    @TableField("img")
    @NotEmpty(groups = {Update.class},message = "相关图片不能为空")
    private String img;

    /**
     * 故障信息
     */
    @TableField("fault_note")
    @NotEmpty(groups = {Update.class},message = "故障信息不能为空")
    private String faultNote;

    /**
     * 上传维修后的图片信息
     */
    @TableField("fault_img")
    private String faultImg;

    /**
     * 维修耗材(对应bas_repair_goods集合的json)
     */
    @TableField(exist = false)
    private List<BasRepairGoods> repairGoodsList;

    @TableField("repair_goods")
    private String repairGoods;

    /**
     * 维修意见
     */
    @TableField("maintain_note")
    private String maintainNote;

    @TableField("create_time")
    private Date createTime;

    /**
     * 维修人员
     */
    @TableField(exist = false)
    @NotEmpty(groups = {Update.class},message = "维修人员不能为空")
    private List<MemberReturn> memberList;

    @ApiModelProperty("检查人员")
    @TableField("check_user_id")
    private Long checkUserId;

    @ApiModelProperty("流程实例id")
    @TableField("process_instance_id")
    private String processInstanceId;

    /**
     * 处理进度
     */
    @TableField(exist = false)
    private List<StepBean> stepBeans;
}
